package com.bluefox.system.proxy.test;

/**
 * @Author : 清风冷影
 * @Description:
 * @Date : 2021/12/8  16:09
 */
public class Cinema implements Movie{

    private RealMovie realMovie;

    public Cinema(RealMovie realMovie) {
        this.realMovie = realMovie;
    }

    @Override
    public void play() {
        advertisement(true);
        realMovie.play();
        advertisement(false);

    }
    public void advertisement(boolean isStart){
        if(isStart){
            System.out.println("电影马上开始了，爆米花、可乐、口香糖9.8折，快来买啊！");
        }else{
            System.out.println("电影马上结束了，爆米花、可乐、口香糖9.8折，买回家吃吧！");
        }
    }
}
